﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Threading.Tasks;

namespace T1task1
{
    class program
    {
        
        static void Main(string[] args)
        {
            Game game1 = new Game();
            game1.name = "只狼";
            game1.category = "主机游戏";
            game1.price = 267;
            game1.stock = 1000;
            game1.addTime = DateTime.Now;

            Game game2 = new Game();
            game2.name = "超凡双生";
            game2.category = "主机游戏";
            game2.price = 324;
            game2.stock = 1000;
            game2.addTime = DateTime.Now;

            Game game3 = new Game();
            game3.name = "奇异人生2";
            game3.category = "主机游戏";
            game3.price = 149;
            game3.stock = 1000;
            game3.addTime = DateTime.Now;

            Game[] gameList = new Game[3];
            gameList[0] = game1;
            gameList[1] = game2;
            gameList[2] = game3;

            for (int i = 0; i < gameList.Length; i++) 
            {
                gameList[i].display();
                gameList[i].Sale(50);
                gameList[i].Store(40);
            }
        }
    }
}
